package com.xbq.exceleditor

import android.content.Context
import com.xbq.exceleditor.adapter.*
import com.xbq.exceleditor.bean.viewmodel.*
import com.xbq.exceleditor.db.DatabaseFactory
import com.xbq.exceleditor.db.ExcelDatabase
import com.xbq.xbqsdk.core.db.DatabaseContext
import com.xbq.xbqsdk.net.officeeditor.OfficeTypeEnum
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton


val OFFICE_TYPE = OfficeTypeEnum.EXCEL
const val NET_PAGE_SIZE =20

@Module
@InstallIn(SingletonComponent::class)
class AppModule {
    @Singleton
    @Provides
    fun provideDocDatabase(@ApplicationContext context: Context): ExcelDatabase {
        return DatabaseFactory.createDatabase(DatabaseContext(context))
    }

}